<template>
  <div>
    <div class="navigationBar" v-show="isShowNav">
      <div
        class="navigationBar_left"
        v-customShow="this.$router.routeStack.length > 1"
        @click="onClickBack"
      >
        <slot name="left"></slot>
      </div>
      <div class="navigationBar_center">
        <slot name="center"></slot>
      </div>
      <div class="navigationBar_right">
        <slot name="right"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  computed: {
    isShowNav: function () {
      return this.$route.meta.isShowNav;
    },
  },
  methods: {
    onClickBack() {
      this.$router.backRoute();
    },
  },
};
</script>

<style>
.navigationBar {
  width: 100%;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e6e6e6;
  
  z-index: 999;
}
.navigationBar img {
  width: 40%;
}
.navigationBar_left {
  width: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.navigationBar_left img {
  width: 100rem;
}
.navigationBar_center {
  width: 60%;
  font-size: 1rem;
  color: aqua;
  display: flex;
  align-items: center;
  justify-content: center;
}
.navigationBar_right {
  width: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-swipe van-swipe {
  width: 100%;
}
.navigationBar_right img {
  width: 1rem;
}
</style>